const Router = require('koa-router');

const {create, avatarInfo} = require('../controller/user.controller')

// 导入中间件
const {verifyUser,handlePassword} =require('../middleware/user.middleware')

//  创建新的用户
const userRouter = new Router({prefix: '/users'});

userRouter.post('/',verifyUser,handlePassword,create);
userRouter.get('/:userId/avatar', avatarInfo)

module.exports = userRouter;